import random

rand = random.randint(0, 100)
count = 0
while True:
    res = int(input("请输入0到100的整数: "))
    count += 1
    if res > rand:
        print("猜大了")
    elif res < rand:
        print("猜小了")
    else:
        print(f"预测{count}次, 你猜中了")
        break
